package online.niuma.xiaocubao.pojo.vo;

/**
 * @author 一颗蛋50斤
 * IntelliJ IDEA
 */
public enum ErrorCode {

    /**
     * 错误代码
     */
    NO_LOGIN(301, "未登录"),
    TOKEN_ERROR(302, "token 不合法"),
    PARAMS_ERROR(310, "参数错误"),
    ACCOUNT_UP_ERROR(311, "账号已存在"),
    EMAIL_UP_ERROR(312, "邮箱已存在"),
    VERIFICATION_CODE_ERROR(313, "验证码错误"),
    VERIFICATION_CODE_NOT_ERROR(314, "验证码实效"),
    ACCOUNT_PWD_NOT_EXIST(315, "用户名或密码不存在"),
    ACCOUNT_EXIST(316, "账号已经存在"),
    PASSWORD_LENGTH_ERROR(317, "密码不符合规范，密码的长度在 6 - 16之间"),
    OLD_PASSWORD_ERROR(318, "旧密码密码错误"),
    ACCOUNT_STOP(319, "账号被停用"),
    NO_PERMISSION(401, "无权限访问"),
    SESSION_TIME_OUT(510, "会话超时"),
    UPDATE_USERINFO_ERROR(511, "用户信息修改失败"),
    ;

    private int code;

    private String msg;

    ErrorCode(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }
}
